﻿using Elev.Farmworker.Utility;
using Elev.Utility;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Elev.Test
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        MainView mainView;
        public MainWindow()
        {
            InitializeComponent();
            mainView = new MainView();
            this.DataContext = mainView;
            string path = @"E:\Movies\电影";

            List<Entity> list = new List<Entity>();
            list.Add(new Entity() { ID = "0" });
            list.Add(new Entity() { ID = "1" });
            list.Add(new Entity() { ID = "2" });
            mainView.DGSource = list;
        }

        private void button_Click(object sender, RoutedEventArgs e)
        {
            //FileListEntity fileSelect = dgView.SelectedItem as FileListEntity;
        }
    }

    public class MainView : BaseViewModel
    {
        List<Entity> dGSource;

        public List<Entity> DGSource
        {
            get
            {
                return dGSource;
            }

            set
            {
                dGSource = value;
                OnPropertyChanged("DGSource");
            }
        }
    }

    public class Entity
    {
        private string iD;

        public string ID
        {
            get
            {
                return iD;
            }

            set
            {
                iD = value;
            }
        }
    }
}
